package com.tarena.lbs.basic.dao.repository.impl;

import com.tarena.lbs.basic.dao.mapper.AreaMapper;
import com.tarena.lbs.basic.dao.repository.AreaRepository;
import com.tarena.lbs.basic.pojo.vo.AreaVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;


import java.util.List;

@Slf4j
@Repository
public class AreaRepositoryImpl implements AreaRepository {
    @Autowired
    private AreaMapper areaMapper;

    @Override
    public List<AreaVO> queryProvinces(Integer depth) {
       List<AreaVO> areaVOS =areaMapper.selectProvinces(depth);
        return areaVOS;
    }

    @Override
    public List<AreaVO> queryProvincesByParentId(Long id) {
      List<AreaVO> areaVO =  areaMapper.selectProvincesByParentId(id);
        return areaVO;
    }

}
